Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NXImageView

Inherits From:	Control : View : Responder : Object

Declared In:	eointerface/NXImageView.h

Class Description

An NXImageView displays a single NXImage object bordered by one of three types of frame (or none): the standard bezel and groove frames, or a ªphotoº frame composed of a simply box with a drop shadow. If editing is enabled, the user can drag a new image into an NXImageView's frame (using the Application Kit's image-dragging mechanism).

The Enterprise Objects Framework permits an NXImageView object to be associated with any attribute with a custom value class of NXImage.

Instance Variables

None declared in this class.

Method Types

Initializing a new instance	- initFrame:

Drawing	- drawSelf::

Setting the image	- setImage:
- image

Setting the border style	- setStyle:
- style

Setting editability	- setEditable:
- isEditable

Instance Methods

drawSelf::

- drawSelf:(const NXRect *)rects :(int)rectCount

Draws the NXImage and the border around it (if any). You never invoke this method yourself; it's invoked automatically by the Application Kit's display mechanism. Returns self.

See also:  - drawSelf:: (View class of the Application Kit)

image

- image

Returns the NXImage object displayed by the image view. Returns nil if the image view has no image (in which case it fills itself with light gray).

initFrame:

- initFrame:(const NXRect *)frameRect

Initializes the image view with frameRect as its frame. This is the designated initializer for the NXImageView class. Returns self.

isEditable

- (BOOL)isEditable

Returns YES if the image can be replaced or deleted, NO if it can't.

setEditable:

- setEditable:(BOOL)flag

Makes the NXImageView editable or not, according to flag. ªEditableº for an image view means that the image it displays can be replaced or deleted; it doesn't mean that the image can be altered.

setImage:

- setImage:anImage

Sets the NXImage object displayed by the image view to anImage. Returns self.

setStyle:

- setStyle:(int)aStyle

Sets the style in which the image's border is drawn. aStyle must be one of the following:

NX_ImageNoFrame
NX_ImagePhoto
NX_ImageGrayBezel
NX_ImageGroove

style

- (int)style

Returns the current border style as one of the values listed as arguments to setStyle:.